import React from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import Login from './pages/login/login'
import Home from './pages/home/home'
import Index from './pages/home/index/index'
import Chat from './pages/home/chat/chat'
import Table from './pages/home/table/table';
import Echarts from './pages/home/table/echarts/echarts';
import List from './pages/home/table/list/list';
import Map from './pages/home/map/map'

function App() {
  return (
    <div className="App">
      <Routes>
        <Route path='/login' element={<Login />} />
        <Route path='/home' element={<Home />} >
          <Route path='/home' element={<Navigate to='/home/index' />} />
          <Route path='index' element={<Index />} />
          <Route path='chat' element={<Chat />} />
          <Route path='table' element={<Table />}>
            <Route path='/home/table' element={<Navigate to='/home/table/echarts' />} />
            <Route path='echarts' element={<Echarts />} />
            <Route path='list' element={<List />} />
          </Route>
          <Route path='map' element={<Map />} />
        </Route>
        <Route path='' element={<Navigate to='/login' />} />
      </Routes>
    </div>
  )
}

export default App;
